<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1; minimum-scale=1; user-scalable=no;" />
    <title><#$shopinfo[0]['shopname']#></title>
    <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/tmpl/wifiadv/css/css.css"><!--风格-->
    <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/tmpl/wifiadv/css/media.css"><!--自适应-->
    <link href="<#$Theme['P']['js']#>/swiper/swiper.css" rel="stylesheet" />
    <script type="text/javascript">
        url = "<#:U('Userauth/noauth')#>";
        if(isWeiXin()){
            window.location.href = url;
        }
        function isWeiXin(){
            var ua = window.navigator.userAgent.toLowerCase();
            if(ua.match(/MicroMessenger/i) == 'micromessenger'){
                return true;
            }else{
                return false;
            }
        }
    </script>
</head>
<body>
<!-- 头部 BOF-->
<include file="public:head$wifiadv"/>
<!-- 头部 EOF-->
<div class="mainbox bgindex clearfix">
    <!-- 轮播广告 BOF-->
    <div class="focus">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <notempty name="ad">
                    <volist name="ad" id="vo">
                        <div  class="swiper-slide">
                                <img src="<#$vo['ad_thumb']#>" width="100%">
                        </div>
                    </volist>
                    <else/>
                    <div  class="swiper-slide">
                        <img src="<#$Theme['P']['root']#>/images/ad/noad01.jpg" width="100%">
                    </div>
                    <div  class="swiper-slide">
                        <img src="<#$Theme['P']['root']#>/images/ad/noad02.jpg" width="100%">
                    </div>
                </notempty>
            </div>
        </div>
    </div>
    <!-- 轮播广告 EOF -->
    <!-- 功能菜单 BOF-->
    <div class="focus">
        <input type="button" value="连接上网" id="btn" class="headtitle mainbox btntitle font20">
    </div>

    <!-- 功能菜单 BOF-->
    <include file="public:foot$wifiadv"/>
</div>
<script type="text/javascript" src="<#$Theme['P']['js']#>/jquery.js"></script>
<script type="text/javascript" src="<#$Theme['P']['js']#>/swiper/swiper.js"></script>
<script>
    var mySwiper = new Swiper('.swiper-container',{
        loop:true,
        grabCursor: true,
        paginationClickable: true,
        calculateHeight:true,
        autoplay:3000
    });
</script>
<script>
    $(document).ready(function() {

        url_redirect(5000);

        $("#btn").click(function () {
            url_redirect(1);
        })
    });
    function url_redirect(time){
        var gw_address = "<#:cookie('gw_address')#>";
        var gw_port = "<#:cookie('gw_port')#>";
        var gw_id = "<#:cookie('gw_id')#>";
        var mac = "<#:cookie('mac')#>";
        var curl = "<#:cookie('url')#>";
        var url = "<#$_SERVER['HTTP_HOST']#>";
        setTimeout(function(){
            window.location ="http://" + url + "/login/?gw_address="+gw_address+"&gw_port="+gw_port+"&gw_id="+gw_id+"&mac="+mac+"&url="+curl+"&state=1";
        },time)
    }
</script>
</body>
</html>